package com.zz.service;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zz.entity.Manager;
import com.zz.repository.ManagerRepository;

@Service
public class ManagerService {
	@Resource
	ManagerRepository managerRepository;
	
	public Manager findByname(String name) {
		return managerRepository.findByName(name);
	}
	//注册
	public Manager register(Manager manager) {
		return managerRepository.save(manager);
	}
	//登录
	public Manager findByNameAndPwd (String name,String pwd) {
		return managerRepository.findByNameAndPwd(name, pwd);
	}
}
